﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Traceability.Register.ErrorCode.EnumCode;

namespace Traceability.Register.Domain
{
    /// <summary>
    /// 用户表
    /// </summary>
    [Table("UserInfo")]
    public class UserInfo
    {
        /// <summary>
        /// 用户编号
        /// </summary>
        [Key]
        public int UserinfoId {  get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(200)]
        public string UserinfoName { get; set; } = string.Empty;
        /// <summary>
        /// 密码
        /// </summary>
        [StringLength(200)]
        public string Password { get; set; } = string.Empty;
        /// <summary>
        /// 邮箱
        /// </summary>
        [StringLength(200)]
        public string Email { get; set; } = string.Empty;
        /// <summary>
        /// 手机号
        /// </summary>
        [StringLength(11)]
        public string Phone {  get; set; } = string.Empty;
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted {  get; set; }
        /// <summary>
        /// 角色枚举
        /// </summary>
        public RoleEnum Role {  get; set; }
    }
}
